<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">

	body{
		background-color:#E7D9AC;
	}
	#wishList{
		width:90%;
		height:250px;
		border-radius:20px;
		margin:auto;
		margin-top:2%;
		margin-left:3%;
		padding:2%;
		font-size:small;
		border:1px solid gray;
		float:left;
	}
	#nothing{
		color:blue;
	}
	table,th,td{
		border-collapse:collapse;
	}
	th{
		text-align:center;
		height:25px;
		background-color:gray;
		color:white;
	}
	td{
		width:18%;
		padding:2px 0;
	}
	tr{
		border-bottom:1px solid gray;
	}
	#wishTable{
		max-height:200px;
		overflow: auto;
	}
	.form-group button{ 
		font-size:small;
	}
	.custom-icon-bar {
		background-color: #FFFFFF;
	}
	#title{
		font-size:x-large;
	}

</style>
</head>
<body>

	<form action="giftCoupon.do" name="giftCoupon" method="post">
		<div id="wishList">
			
			<c:if test="${empty markList}">
				<div class="form-group" style="margin-top: 100px;" align="center">
					 <font size="3"><strong>관심 리스트에 아무도 없네요.</strong><br> 리스트에서 호감가는 이성을<br> 찜해보세요~~</font>
				</div>
			</c:if>
			
			<c:if test="${!empty markList}">
				<div class="form-group">
					<div id="name" class="col-md-12 col-xs-12 col-sm-12" align="center">
						선택하신 ${cou_name}을<br> 누구에게 선물로 주시겠습니까?
					</div>
				</div>
		
				<div id="wishTable">
					<table class="wishTable">
						<tr id="tableTitle">
							<th>이미지</th>
							<th>이름</th>
							<th>나이</th>
							<th>선택</th>
						</tr>
						<c:forEach var="wishList" items="${markList}">
							<tr>
								<td align="center"><img src="${pageContext.request.contextPath}/upload/${wishList.image}" width="70px" height="70px"></td>
								<td align="center">${wishList.name}</td>
								<td align="center">${wishList.age}</td>
								<td align="center"><input type="radio" name="mark_id" value="${wishList.mark_id}"></td>
							</tr>
						</c:forEach>
					</table>
				</div>
			</c:if>
		</div>
		
		<c:if test="${!empty markList}">
		<div style="margin-top:10px; float:left;">
			<label for="content" class="col-md-2 col-xs-2 col-sm-2 control-label">메시지 첨부하기</label>
			<div class="col-md-7 col-xs-7 col-sm-7">
				<textarea cols="30" rows="5" name="content" class="form-control">${name}님께서 ${cou_name}을 보내셨습니다.</textarea>
			</div>
		</div>
	
	<input type="hidden" name="cou_id" value="${cou_id}">
	<input type="submit" value="선물하기">
	</c:if>
	</form>

</body>
</html>